/*
 *  Copyright 2010 Mahbub Mozadded Sowrov.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */
package com.sowrov.util.logsystem;


/**
 * All OutputDevice will have to implement this interface.
 * Example OutputDevices are: Standard Output (Console), File (Disk), Network port, Printer, etc.
 *
 * @author Sowrov
 * @version %I% %G%
 */
public interface OutputDevice {
    /**
     * If the device was never used after construction, it should reply false, else true.
     *
     * @return true/false
     */
    boolean isFreshDevice();

    /**
     * Close the Device.
     */
    void close();

    /**
     * Flash any buffer text to the device.
     */
    void flush();

    /**
     * Any Initialization steps for the device.
     */
    void init();

    /**
     * Write an string to the device.
     *
     * @param str String
     */
    void write(final String str);
} // end OutputDevice
